import type { AppRouteModule } from '@/router/types';
import { RoleEnum } from '@/enums/roleEnum';
import { LAYOUT } from '@/router/constant';

const nutrition: AppRouteModule = {
  path: '/nutrition',
  name: 'Nutrition',
  component: LAYOUT,
  redirect: '/nutrition/index',
  meta: {
    hideChildrenInMenu: true,
    orderNo: 1,
    icon: 'ion:layers-outline',
    title: '营养食谱',
    roles: [RoleEnum.YYS, RoleEnum.USER],
  },

  children: [
    {
      path: 'index',
      name: 'NutritionIndex',
      component: () => import('@/views/nutrition/index.vue'),
      meta: {
        title: '营养食谱',
        hideMenu: true,
        icon: 'simple-icons:aboutdotme',
        roles: [RoleEnum.YYS, RoleEnum.USER],
      },
    },
  ],
};

export default nutrition;
